import Vue from 'vue'
import VueRouter from 'vue-router'
import RecMusic from '../components/RecMusic/RecMusic.vue'
import Hot from '../components/Hot/Hot.vue'
import Search from '../components/Search/Search.vue'
import TabBar from '../components/TabBar/TabBar'
import Header from '../components/Header/Header'
import Play from '../components/play/play'
import mDefault from '../components/mDefault/mDefault'
import mRec from '../components/mRec/mRec'
import mResult from '../components/mResult/mResult'
Vue.use(VueRouter);

const router = new VueRouter({
    linkActiveClass:'active',//设置 链接激活时使用的 CSS 类名。默认值可以通过路由的构造选项 linkActiveClass 来全局配置
    routes:[
        {path:'/',redirect:'/recmusic'},
        {path:'/recmusic',component:RecMusic},
        {path:'/hot',component:Hot},
        {
            path:'/search',
            component:Search,
            children:[
                {path:'',redirect:'mdefault'},
                {path:'mdefault',component:mDefault},
                {path:'mrec',component:mRec},
                {path:'mresult',component:mResult}
                ]
        },
            {path:'/tabbar',component:TabBar},
            {path:'/header',component:Header},
            {path:'/play',component:Play}
    ]
});

export default router